CC = gcc -Wall -Wextra `gpgme-config --cflags`
BIN = spirc
SOURCES = main.c userio.c modem.c irc.c gpg.c
HEADERS = modem.h userio.h irc.h gpg.h
OFILES = modem.o userio.o irc.o main.o gpg.o
.PHONY: all clean
all: ${OFILES}
	${CC} -o ${BIN} ${OFILES} `gpgme-config --thread=pthread --libs`
gpg.o: gpg.c gpg.h
	${CC} -c  gpg.c
modem.o: modem.c modem.h
	${CC} -c modem.c
irc.o: irc.c modem.h irc.h	
	${CC} -c irc.c
userio.o: userio.c modem.h userio.h	
	${CC} -c userio.c
main.o: ${HEADERS} main.c
	${CC} -c main.c
clean: 
	rm -f ${BIN} ${OFILES}
